package com.ruoyi.web.core.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author LiuYu
 * @version: V1.0
 * @className: Knife4jConfig
 * @description: 类的功能描述
 * @time 2025/6/14
 */
@Configuration
public class Knife4jConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("RuoYi-Vue API")
                        .version("3.0")
                        .description("基于RuoYi-Vue-SpringBoot3"));
    }

    @Bean
    public GroupedOpenApi adminApi() {
        return GroupedOpenApi.builder()
                .group("system")
                .displayName("系统模块接口")
                .packagesToScan("com.ruoyi.web.controller.system")
                .build();
    }

}
